home *** CD-ROM | disk | FTP | other *** search
- global gInError
-
- on error errNum
- global gPrintErrors, gLogErrors
- if gInError = "InError" then
- return
- end if
- set gInError to "InError"
- if gPrintErrors then
- if errNum < 0 then
- alert("Error " & errNum)
- else
- alert("Error TRS-" & errNum & ": " & field ("Error " & errNum))
- end if
- end if
- if gLogErrors then
- if errNum < 0 then
- appendTextFile("@\errors.log", RETURN & the date & TAB & the time & TAB & getState() & TAB & errNum & TAB & "Error " & errNum)
- else
- appendTextFile("@\errors.log", RETURN & the date & TAB & the time & TAB & getState() & TAB & errNum & TAB & "Error TRS-" & errNum & ": " & field ("Error " & errNum) & RETURN)
- end if
- end if
- set gInError to EMPTY
- end
-